﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using B10.Properties;
using System.Web.Mvc;
using System.ComponentModel;
using System.Web.Script.Serialization;

namespace B10.Models.Validation
{


    [Bind(Include = "Title,Keywords,Description,AllowComments")]
    public class UserPageValidation
    {
        [StringLength(128)]
        [Required]
        [LocalizedDisplayName("Title")]
        public object Title { get; set; }

        [StringLength(256)]
        [Required]
        [RegularExpression(@"[^,]+(,[^,]+){2,},?", ErrorMessageResourceName = "NumberOfKeywords",
        ErrorMessageResourceType = typeof(B10.Properties.ValidationMessages))]
        [LocalizedDisplayName("Keywords")]
        public object Keywords { get; set; }

        [StringLength(512)]
        [Required]
        [LocalizedDisplayName("Description")]
        public object Description { get; set; }

        [Range(0, 20)]
        [LocalizedDisplayName("Category")]
        public object Category { get; set; }

        [LocalizedDisplayName("AllowComments")]
        public object AllowComments { get; set; }

        [LocalizedDisplayName("CreateDate")]
        public object CreatedDate { get; set; }

        [LocalizedDisplayName("PageViews")]
        public object PageViews { get; set; }


    }
}
